package com.itlong.cloud.noncore.operate;

import com.itlong.cloud.POJO.DTO.operate.OperateHomePageDTO;
import com.itlong.cloud.POJO.VO.operate.OperateAppHomePageGetPageVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * <desc>
 *      运营-APP-启动管理业务处理暴露接口
 * </desc>
 *
 * @createDate 2019/06/24
 */
@FeignClient("non-core-service")
public interface IOperateAppHomePageServiceClient {

    /**
     * <desc>
     *      获取分页数据
     * </desc>
     *
     * @return page模型
     * @author Qiang.S
     * @createDate 2019/06/24
     */
    @RequestMapping(path = "/operate/appManage/homePage/getHomePage")
    Page<OperateAppHomePageGetPageVO> getHomePage() throws Exception;

    /**
     * <desc>
     *      添加启动页
     * </desc>
     *
     * @param dto 功能实体
     * @return sql执行行数
     * @author Qiang.S
     * @createDate 2019/06/24
     */
    @RequestMapping(path = "/operate/appManage/homePage/save")
    Integer save(@RequestBody OperateHomePageDTO dto) throws Exception;

    /**
     * <desc>
     *      更新功能
     * </desc>
     *
     * @param dto 功能实体
     * @return sql执行行数
     * @author Qiang.S
     * @createDate 2019/06/24
     */
    @RequestMapping(path = "/operate/appManage/homePage/update")
    Integer update(@RequestBody OperateHomePageDTO dto) throws Exception;

    /**
     * <desc>
     *      通过id获取功能
     * </desc>
     *
     * @param homePageId 启动页编号
     * @return
     * @author Qiang.S
     * @createDate 2019/06/24
     */
    @RequestMapping(path = "/operate/appManage/homePage/getOne")
    OperateAppHomePageGetPageVO getOne(@RequestParam("homePageId") String homePageId);

    /**
     * <desc>
     *      删除功能
     * </desc>
     *
     * @param homePageId 启动页编号
     * @return sql执行行数
     * @author Qiang.S
     * @createDate 2019/06/24
     */
    @RequestMapping(path = "/operate/appManage/homePage/delete")
    Integer delete(@RequestParam("homePageId") String homePageId);

    /**
     * <desc>
     *      获取启动页可用数据
     * </desc>
     *
     * @return page模型
     * @author Qiang.S
     * @createDate 2019/06/24
     */
    @RequestMapping(path = "/operate/appManage/homePage/StartAdvertising")
    OperateAppHomePageGetPageVO StartAdvertising() throws Exception;
}
